def decimal_to_binary(decimal):
    binary = ""
    if decimal == 0:
        return "0"
    while decimal > 0:
        remainder = decimal % 2
        binary = str(remainder) + binary
        decimal = decimal // 2
    return binary

# 测试示例
num = int(input("请输入一个十进制数："))
print(f"对应的二进制数为：{decimal_to_binary(num)}")